package com.cx.mapper;

import com.cx.pojo.Game;
import com.cx.pojo.GameExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface GameMapper {
    int countByExample(GameExample example);

    int deleteByExample(GameExample example);

    int deleteByPrimaryKey(Integer gameId);

    int insert(Game record);

    int insertSelective(Game record);

    List<Game> selectByExampleWithBLOBs(GameExample example);

    List<Game> selectByExample(GameExample example);

    Game selectByPrimaryKey(Integer gameId);

    int updateByExampleSelective(@Param("record") Game record, @Param("example") GameExample example);

    int updateByExampleWithBLOBs(@Param("record") Game record, @Param("example") GameExample example);

    int updateByExample(@Param("record") Game record, @Param("example") GameExample example);

    int updateByPrimaryKeySelective(Game record);

    int updateByPrimaryKeyWithBLOBs(Game record);

    int updateByPrimaryKey(Game record);

    int publishGame(Game game);

    List<Game> selectAll();

    int deleteGame(Integer gameId);

    List<Game> selectByUserId(String userId);

    List<Game> selectByGameName(String gameName);

    List<Game> selectByType(String gtId);

    List<Game> selectByDiscount();

    List<Game> selectByPrice(@Param("params") Map<String,Long> params);
}